package com.feng.zhihao.apigeteway.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * InterfaceFieldGenerationRule entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "INTERFACE_FIELD_GENERATION_RULE")

public class InterfaceFieldGenerationRule implements java.io.Serializable {

	// Fields

	private String generationRuleId;
	private InterfaceFieldInfo interfaceFieldInfo;
	private String generationRuleType;
	private String generationRuleExplain;
	private String generationRuleBeanId;
	private String ognl;
	private String js;
	private String enumRandom;
	private String json;

	// Constructors

	/** default constructor */
	public InterfaceFieldGenerationRule() {
	}

	/** minimal constructor */
	public InterfaceFieldGenerationRule(String generationRuleId, InterfaceFieldInfo interfaceFieldInfo) {
		this.generationRuleId = generationRuleId;
		this.interfaceFieldInfo = interfaceFieldInfo;
	}

	/** full constructor */
	public InterfaceFieldGenerationRule(String generationRuleId, InterfaceFieldInfo interfaceFieldInfo,
			String generationRuleType, String generationRuleExplain, String generationRuleBeanId, String ognl,
			String js, String enumRandom, String json) {
		this.generationRuleId = generationRuleId;
		this.interfaceFieldInfo = interfaceFieldInfo;
		this.generationRuleType = generationRuleType;
		this.generationRuleExplain = generationRuleExplain;
		this.generationRuleBeanId = generationRuleBeanId;
		this.ognl = ognl;
		this.js = js;
		this.enumRandom = enumRandom;
		this.json = json;
	}

	// Property accessors
	@Id

	@Column(name = "GENERATION_RULE_ID", unique = true, nullable = false, length = 36)

	public String getGenerationRuleId() {
		return this.generationRuleId;
	}

	public void setGenerationRuleId(String generationRuleId) {
		this.generationRuleId = generationRuleId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "INTERFACE_FIELD_ID", nullable = false)

	public InterfaceFieldInfo getInterfaceFieldInfo() {
		return this.interfaceFieldInfo;
	}

	public void setInterfaceFieldInfo(InterfaceFieldInfo interfaceFieldInfo) {
		this.interfaceFieldInfo = interfaceFieldInfo;
	}

	@Column(name = "GENERATION_RULE_TYPE", length = 512)

	public String getGenerationRuleType() {
		return this.generationRuleType;
	}

	public void setGenerationRuleType(String generationRuleType) {
		this.generationRuleType = generationRuleType;
	}

	@Column(name = "GENERATION_RULE_EXPLAIN", length = 4096)

	public String getGenerationRuleExplain() {
		return this.generationRuleExplain;
	}

	public void setGenerationRuleExplain(String generationRuleExplain) {
		this.generationRuleExplain = generationRuleExplain;
	}

	@Column(name = "GENERATION_RULE_BEAN_ID", length = 36)

	public String getGenerationRuleBeanId() {
		return this.generationRuleBeanId;
	}

	public void setGenerationRuleBeanId(String generationRuleBeanId) {
		this.generationRuleBeanId = generationRuleBeanId;
	}

	@Column(name = "OGNL", length = 1024)

	public String getOgnl() {
		return this.ognl;
	}

	public void setOgnl(String ognl) {
		this.ognl = ognl;
	}

	@Column(name = "JS", length = 65535)

	public String getJs() {
		return this.js;
	}

	public void setJs(String js) {
		this.js = js;
	}

	@Column(name = "ENUM_RANDOM", length = 65535)

	public String getEnumRandom() {
		return this.enumRandom;
	}

	public void setEnumRandom(String enumRandom) {
		this.enumRandom = enumRandom;
	}

	@Column(name = "JSON", length = 65535)

	public String getJson() {
		return this.json;
	}

	public void setJson(String json) {
		this.json = json;
	}

}